import api from "../utils/request";

//获取菜单列表
export const getUserListAPI = () => {
  return api.post("/admin/base/sys/user/list");
};

//菜单新增
export const getMenuAddAPI = (data) => {
  return api.post("/admin/base/sys/menu/add", data);
};

//获取用户列表数据---分页
export const getUserPageAPI = (data) => {
  return api.post("/admin/base/sys/user/page", data);
};

//用户新增
export const getUserAddAPI = (data) => {
  return api.post("/admin/base/sys/user/add", data);
};

//用户编辑
export const getUserEditAPI = (data) => {
  return api.post("/admin/base/sys/user/update", data);
};

//用户删除
export const getUserDeleteAPI = (data) => {
  return api.post("/admin/base/sys/user/delete", data);
};

//文件上传
export const getUserUploadAPI = (data) => {
  return api({
    url: "/app/base/comm/upload",
    method: "POST",
    headers: {
      "Content-Type": "multipart/form-data",
    },
    data: {
      file: data,
    },
  });
};
